package com.qunar.wireless.ugc.qcfclient.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.lucene.document.Document;

public class QueryResult implements Serializable {
	private static final long serialVersionUID = 6884728127628808024L;
	private int totalRecords;
	private List<Document> resultList;
	
	public QueryResult() {}

	public QueryResult(int totalRecords, List<Document> resultList) {
		this.totalRecords = totalRecords;
		this.resultList = resultList;
	}

	public int getTotalRecords() {
		return totalRecords;
	}

	public void setTotalRecords(int totalRecords) {
		this.totalRecords = totalRecords;
	}

	public List<Document> getResultList() {
		if(resultList == null || resultList.size() == 0) return new ArrayList<Document>();
		return resultList;
	}

	public void setResultList(List<Document> resultList) {
		this.resultList = resultList;
	}

}
